1. Field of the Invention
The present invention relates to the Dynamic Host Configuration Protocol (DHCP) used in conjunction with large scale data communications networks such as the Internet. More particularly, the present invention relates to utilizing a DHCP server to allocate dynamic network addresses to various devices, rather than just to dial-up users.
2. The Background
As shown in FIG. 1, the Internet, or any large data communications network, 10 may be described as a group of interconnected computing networks (not shown) that are tied together through a backbone 12. The computing networks, in turn, provide access points, such as access points 14, 16 and 18, through which users may connect to the Internet via a station (a computer having a connection to a network) or host, such as hosts 20, 22, 24, and 26. An access point is essentially a location on the Internet that permits access to the Internet. An access point may include a modem pool (not shown) maintained by an ISP (Internet Services Provider) which enables its subscribers to obtain Internet access through a host having a dial-up connection. Those of ordinary skill in the art will recognize that other types of access methods may be provided by an ISP such as frame relay, leased lines, ATM (asynchronous transfer mode), ADSL, and the like.
Regardless of the access method used, each device (e.g., a host or router) that receives, sends and/or routes information between or among other devices on Internet 10 is configured to communicate with other devices using a communication protocol that may be understood by the other devices. The current communication protocol used by these devices on the Internet is TCP/IP (transmission control protocol/internet protocol). In addition, each device that can send or receive information (e.g., a host device) must also have a unique host address. The type of host address used for the Internet, or an equivalent switched network that uses TCP/IP, is commonly referred to as an IP address. A standard TCP/IP address in accordance with current standards is 4 bytes (32 bits) in length, providing a total of 232 possible IP addresses. Those of ordinary skill in the art will readily recognize that not all of these possible IP addresses are available due to administrative expediencies, such as reserving blocks of IP addresses for future use.
Sending or receiving information using the TCP/IP protocol requires encapsulating information into packets. Each packet includes a header and a payload. The header contains information related to the handling of the payload by a receiving host or routing device, while the payload contains part or all of the user information. The information in the header includes the sender""s and the recipient""s addresses and is used to route the packet through the Internet until the packet is received by a host having an IP address that matches the packet""s destination address (when referring to the source IP address and destination IP address of a packet, the source IP address and destination IP address are commonly referred to as xe2x80x9cSAxe2x80x9d and xe2x80x9cDAxe2x80x9d, respectively). This enables users to accurately send and receive information with each other through their respective host computers.
By implementing a protocol common to all devices using Internet 10, users may send and receive information with other users on the Internet in a seamless manner regardless of geographic location or the type of host and/or interconnected network used.
The dramatic increase in popularity of the Internet in recent years has created a concern about the number of available IP addresses under the current standard (known as IP v.4). ISPs and domains are generally allocated a finite number of IP addresses. The ISPs and domains, therefore, are constantly looking for ways to limit the number of IP addresses they use while still providing access to the greatest number of users.
One solution for mitigating the effect of the number of users requiring host addresses is to dynamically allocate host addresses for users who do not have dedicated connections to the Internet, such as users who use dial-up access methods to connect to an ISP. Dynamic allocation of IP addresses entails having a pool of IP addresses, such as IP address pool, from which an ISP can draw from each time a valid subscriber (who does not use a dedicated connection or a connection that does not have a framed IP address, i.e., a static IP address) seeks to access the Internet. Once the subscriber logs on to an ISP and is properly authenticated, the ISP allocates an IP address for use by the user. This task is normally performed by a Dynamic Host Configuration Protocol (DHCP) server or service existing at the ISP (or other local segment of the Internet).
Upon log-off, the DHCP server releases the assigned/allocated IP address, rendering that IP address available for subsequent use by another user. In this way, a set of IP addresses can be used to provide access to a number of users that exceed the number of IP address comprising the IP address pool, assuming that at any given time the number of users seeking to log-on and obtain dynamic IP addresses is less than or equal to the number of IP address available in the IP address pool.
FIG. 2 is a diagram illustrating the format of a DHCP message. Message 50 includes an op field 52, which indicates whether the message is a request or a reply. An htype field 54 indicates the hardware address type. An hlen field 56 indicates the hardware address length. An hops field 58 is initially sent to zero by the client and is used by relay-agents. An xid field 60 indicates the transaction ID, which is a random number chosen by the client and used to associate messages with responses. A secs field 62 indicates the elapsed time (in seconds) since the client started trying to boot. The flags field 64 includes a number of different flags utilized by the client and server. The ciaddr field 66 indicates the client""s IP address. The yiaddr field 68 indicates the offered or assigned temporary IP address. The siaddr field 70 is used to indicate the next server in a bootstrap. A bootstrap is a network of devices utilizing a bootstrap protocol, such as BOOTP (Bootstrap Protocol). The bootstrap protocol allows the devices to deliver assigned IP addresses and dynamically configure software to remote devices. The siaddr field 70 would then indicate the next server or device in the bootstrap. A giaddr field 72 indicates the relay agent""s (if any) IP address. A chaddr field 74 indicates the client hardware address. Sname field 76 indicates an optional server host name. Afile field 78 indicates a boot file name or options to be used by the client. Finally, a variable length options field 80 may utilize a number of predefined options, while allowing for new options to be created.
A subnet is an independent division of a network interconnected with the network. If a client is on the same sub-net as the DHCP server, the DHCP server simply broadcasts its reply, as every host on the local subnet can receive the broadcast. However, in large networks such as the Internet, a DHCP request packet is not directly sent from a client on the local subnet. Instead, the packet is indirectly passed from the client to the DHCP server through the use of relay agents or servers. In this case, the DHCP server will send its reply packet to the address found in the giaddr field 72, which is the address of the last relay agent or server. This relay agent or server will then pass the reply packet along to other relay agents or servers until it eventually reaches the client. However, the giaddr field 72 also is used as the subnet ID, which is depended upon by a DHCP server in allocating an IP address. The DHCP server will allocate an IP address that has the same subnet as the giaddr field 72. There may be times when this may create problems. For example, if one wants to allocate an IP address that has a different subnet from that of the relay agent, one will be unable to do so since both must match the giaddr field 72. Additionally, if a gateway is utilized to request an IP address for a user, the gateway may be utilizing the giaddr field 72 for IP pool identification, or other purposes. Finally, if the gateway requested the IP address, it is preferable to send the reply packet back directly to the gateway rather than to the client on whose behalf the gateway made the request. There may be other instances where it is inappropriate to send the reply packet to the address in the giaddr field 72 because either the field does not accurately reflect a destination which allows the packet to get back to the requestor, or the field is utilized for other purposes. It is therefore preferable to have a solution which allows the DHCP server to send the reply packet directly back to the requester.
A method for replying to a DHCP request packet is provided which allows a DHCP server to forward its reply packet directly back to the requester, thus permitting a gateway or similar device to make a DHCP request on behalf of a client. A reply to sender options field in the DHCP request packet is used to signify when the reply packet should be sent directly back to the requester. The method includes: examining the reply to sender field; extracting an address from the giaddr field if a flag in the reply to sender field is not set; forwarding a reply packet to said address extracted from the giaddr field if the flag in the reply to sender field is not set and said giaddr field is not empty; broadcasting a reply packet over a local subnet if the flag in the reply to sender field is not set and said giaddr field is empty; extracting a source network address from the source network address field if the flag in the reply to sender field is set; and forwarding a reply packet to said source network address if the flag in the reply to sender field is set.
A DHCP server is also provided for performing the method indicated above. The DHCP server includes: a reply to sender field examiner; a giaddr field extractor coupled to said reply to sender field examiner if the reply to sender field is not set; a reply packet broadcaster coupled to said giaddr field extractor if said giaddr field is empty; a reply packet forwarder coupled to said giaddr field extractor if said giaddr field is not empty and the reply to sender field is not set; a source network address extractor coupled to said reply to sender field examiner if the reply to sender field is set; and said reply packet forwarder coupled to said source network address extractor if the reply to sender field is set. A system including the DHCP server is also provided.